Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CVE-2007-4559 Patch #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TrellixVulnTeam
Copy link

Patching CVE-2007-4559

Hi, we are security researchers from the Advanced Research Center at Trellix. We have began a campaign to patch a widespread bug named CVE-2007-4559. CVE-2007-4559 is a 15 year old bug in the Python tarfile package. By using extract() or extractall() on a tarfile object without sanitizing input, a maliciously crafted .tar file could perform a directory path traversal attack. We found at least one unsantized extractall() in your codebase and are providing a patch for you via pull request. The patch essentially checks to see if all tarfile members will be extracted safely and throws an exception otherwise. We encourage you to use this patch or your own solution to secure against CVE-2007-4559. Further technical information about the vulnerability can be found in this blog.

If you have further questions you may contact us through this projects lead researcher Kasimir Schulz.

@jmichel80
Copy link

@chryswoods - does this need discussing ?

@lohedges
Copy link
Member

I don't think this code is currently used for anything. However, I see that we do use tar.extractall() within BioSImSpace itself (within the gateway file upload extraction code) so presumably we will receive this patch when their bot (I'm assuming it is a bot) works it way through GitHub.

@chryswoods
Copy link
Member

Wow - I didn't even remember that there was some Acquire code in (the old and unused) BioSimSpaceCloud repo.

This repo should be archived or deleted. It isn't used any more.

@chryswoods
Copy link
Member

Two things to add:

  1. The discussion of the "bug" in tarfile on the Python mailing list was quite interesting. Lots of discussion about whether or not this was a bug.

  2. I don't like to accept random pull requests that come from a bot. It is not clear what the copyright and license status is of the code that the bot has contributed. While we are fully open source, it is not clear that the bot can attest that the copyright on their contribution can be openly licensed. Our existing GPL license should "infect" their contribution, but without a human who has read and acknowledged this, I feel uneasy.

I think the best route forward is to do a check for tar-related code in Sire and BioSimSpace and pro-actively fix this before the bot gets to those repos. It also reminds me that we need to think about making it clear to contributors that pull requests can only be accepted if the code is licensed and licesenable via the GPL. It is a viral license, so does virally infect their contributions when they are shared (e.g. via a pull request) but it is worth making this clear.

We also need to think about how we would handle the non-automatic open sourcing of contributions to anything we license via non-viral open licenses, e.g. MIT etc. For these, we would need the contributor to explicitly state that their contributions are MIT, perhaps even needing to get confirmation of that from their employer?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants